Skip to content

Feat/adminpanel#73

Merged
FalkenDev merged 10 commits into
mainfrom
feat/adminpanel
May 17, 2026
Merged

Feat/adminpanel#73
FalkenDev merged 10 commits into
mainfrom
feat/adminpanel

Conversation

@FalkenDev

Copy link
Copy Markdown
Owner

Admin Panel v0.1.0

Introduces the Grindify admin panel — a separate web app (admin.grindify.io) for platform management. Also ships the global exercise system, full i18n for exercises/activities/muscle groups, exercise images, and the role/superadmin infrastructure that backs it all.


Admin Panel (new app)

A standalone Vue app built and deployed as its own Docker image (grindify-adminpanel). Accessible at admin.grindify.io, protected by the superadmin role.

Views included in this release:

  • Overview — platform stats at a glance
  • Users — list and manage all registered users
  • Global Exercises — create, edit, and publish global exercises available to all users
  • Exercise Images — upload and manage exercise media
  • Muscle Groups — manage muscle group definitions and translations
  • Activity Types — manage global activity types
  • Import / Export — bulk import/export exercises and activities as JSON
  • Analytics, Audit Logs, System Health, Workout Templates, Versions, Settings — scaffolded views for future work

Backend

  • /v1/admin controller — all admin API endpoints, guarded by SuperAdminGuard
  • role column on user'user' | 'superadmin', default 'user', used by the guard
  • Global exercises — exercises can now be marked isGlobal, owned by no user, seeded on startup
  • Global activities — same pattern as exercises
  • Exercise images — new exercise_media entity with file upload support
  • Full i18n — exercises, activities, and muscle groups now store translatable content as JSONB (title, descriptionI18n, instructionsI18n, etc.)
  • Google OAuth strategy added
  • Email verification improvements — additional fields and logic hardening

Migrations (run automatically on deploy)

Migration What it does
MigrateEquipmentToI18n Renames equipmentequipment_i18n on exercise
AddExerciseImageTable Adds exercise_media table
GlobalExercisesAndTranslations Adds JSONB i18n columns, isGlobal, language, personalizedFromGlobalId
DropLegacyColumns Removes superseded string columns from exercise and activity
AddRoleToUser Adds role varchar(20) DEFAULT 'user' to user

⚠️ Prod deploy requires a one-time pre-deploy step. The prod DB was originally created with synchronize: true and has no migrations table. See DEPLOY_v1.2.0.md in the homelab repo before running ansible.


Frontend

  • Exercise listing updated with categorization and localization for user-specific exercises
  • Various component and store improvements across Activity, Session, Settings, Statistics, and Workout flows

Infrastructure

  • Dockerfile.adminpanel — multi-stage build (dev + nginx production)
  • build.yml — added build-adminpanel job, pushes ghcr.io/falkendev/grindify-adminpanel
  • docker-compose.yml — adminpanel service added for local dev (port 3001)
  • docker-compose.prod.yml — adminpanel service added for prod reference

FalkenDev added 10 commits May 12, 2026 17:55
- Created SettingsView and WorkoutTemplatesView with a Coming Soon component.
- Implemented SystemHealthView to monitor service status and latency.
- Developed UsersView for user management with pagination and search functionality.
- Added VersionsView to display release history and update management.
- Established backend Admin module with controller and service for user management.
- Integrated JWT authentication and superadmin guard for protected routes.
- Updated Docker configurations for admin panel deployment.
…ncluding i18n support and legacy column cleanup
- Refactored Exercise and MuscleGroup interfaces to use I18nString for titles and descriptions.
- Introduced I18nString and I18nStringArray types for better localization handling.
- Updated User interface to include language preference.
- Modified Workout and WorkoutSession interfaces to accommodate new exercise structure.
- Added new utility functions for resolving internationalized strings.
- Updated various components and pages to utilize new internationalization methods for displaying exercise and activity names.
- Implemented duplicate functionality for activities and exercises in the respective services.
- Enhanced localization files to support new keys for personalized and global activities.
…agement view

- Added ImportExportView.vue for bulk data operations including exercise and activity import/export.
- Implemented file handling for importing exercises and activities with error handling and user feedback.
- Created MuscleGroupsView.vue for managing muscle groups with create, edit, and delete functionalities.
- Integrated internationalization support for muscle group names and descriptions.
- Added search functionality for muscle groups and loading states for better user experience.
- Introduced ExerciseImage entity to manage exercise images with properties for URL, file size, and creation date.
- Enhanced ExerciseSeedService to seed global exercises on application start, ensuring no duplicates.
- Updated exercise seeding logic to include internationalization for titles and descriptions.
- Created DTOs for muscle group administration, including creation and update functionalities with internationalization support.
- Modified MuscleGroup entity to store internationalized names and descriptions.
- Implemented backfill logic for muscle groups missing internationalized names.
- Updated seed data for activities and exercises to include Swedish translations.
- Enhanced upload service to return file size and added methods for reading and writing files from buffers.
- Added language preference to user preferences and updated user entity accordingly.
- Updated workout service to handle internationalized exercise and muscle group names and descriptions.
- Updated Vite to version 6.4.2 in package.json.
- Added overrides for several packages in package.json to ensure compatibility.
- Disabled ESLint rule for v-html in VersionHistoryDialog.vue to allow HTML rendering.
- Removed unused user update function in WeightLogDialog.vue to simplify code.
- Removed getMetrics function in LogActivity.vue as it was not utilized.
- Simplified weight retrieval logic in workoutSession.store.ts.
- Enhanced type safety in sessionToWorkout.test.ts by using NonNullable.
- Improved error handling in fetchWrapper.ts by removing unnecessary catch parameter.
@FalkenDev FalkenDev self-assigned this May 17, 2026
@github-actions github-actions Bot added topic: ci-cd Changes related to GitHub Actions, Docker, or deployment pipelines. platform: backend For issues concerning the REST API, server logic, database interactions, or authentication. client: web-mobile For issues related to the web app UI/UX, including its responsive mobile views. labels May 17, 2026
@FalkenDev FalkenDev merged commit 5d8fb55 into main May 17, 2026
3 checks passed
@FalkenDev FalkenDev deleted the feat/adminpanel branch May 17, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client: web-mobile For issues related to the web app UI/UX, including its responsive mobile views. platform: backend For issues concerning the REST API, server logic, database interactions, or authentication. topic: ci-cd Changes related to GitHub Actions, Docker, or deployment pipelines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant